import java.math.BigInteger;
public class Main 
{
    public static void main(String[] args) 
    {
        long num = 0;
        int k = 0;
        BigInteger x,y,z,w;
        BigInteger Soo = new BigInteger("711");
        BigInteger SooM = new BigInteger("711000000");
        BigInteger One = new BigInteger("1");
        String sx,sy,sz,sw;

        for(x = new BigInteger("1");x.compareTo(Soo) == -1;x = x.add(One))
        {
            for(y = new BigInteger("1");y.compareTo(Soo) == -1;y = y.add(One))
            {
                for(z = new BigInteger("1");z.compareTo(Soo) == -1;z = z.add(One))
                {
                    w = Soo.subtract(x).subtract(y).subtract(z);
                    num++;
                    if((w.multiply(x).multiply(y).multiply(z)).compareTo(SooM) == 0)
                    {
                        k++;
                        sx = ""+x;
                        sy = ""+y;
                        sz = ""+z;
                        sw = ""+w;
                        double xx = Double.parseDouble(sx);
                        double yy = Double.parseDouble(sy);
                        double zz = Double.parseDouble(sz);
                        double ww = Double.parseDouble(sw);
                        System.out.printf("第%2d：(%f,%f,%f,%f)\n",k,xx/100,yy/100,zz/100,ww/100);
                    }
                }
            }
        }
        System.out.printf("组合遍历计算次数：num = %d\n",num);
    }
}
